package cn.yx.permission.remote.service.impl;

import cn.yx.permission.mapper.RoleUserMapper;
import cn.yx.permission.remote.service.RoleUserRemoteService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.List;

/**
 * <p>角色用户远程服务接口实现类</p>
 *
 * @author Wgssmart
 */
@DubboService
@Slf4j
public class RoleUserRemoteServiceImpl implements RoleUserRemoteService {

    private final RoleUserMapper roleUserMapper;

    public RoleUserRemoteServiceImpl(RoleUserMapper roleUserMapper) {
        this.roleUserMapper = roleUserMapper;
    }

    @Override
    public List<String> listRolesByUserId(Long userId) {
        return roleUserMapper.selectRolesByUserId(userId);
    }
}
